<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
            <title>登录商城</title>
            <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>base.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>global.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>header.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>login.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>footer.css" type="text/css" />
            <meta property="qc:admins" content="2666047133605411516633" />
    </head>
    <body>
        <!-- 顶部导航 start -->
<div class="topnav">
    <div class="topnav_bd w1210 bc">
        <div class="topnav_left">
            
        </div>
        <div class="topnav_right fr">
            <?php if(!empty($_SESSION['user_name'])): ?><ul>
                <li>您好，【<?php echo (session('user_name')); ?>】欢迎来到京西！[<a href="<?php echo U('User/logout');?>">退出系统</a>] </li>
                <li class="line">|</li>
                <li>我的订单</li>
                <li class="line">|</li>
                <li>客户服务</li>
            </ul>
            <?php else: ?>
            <ul>
                <li>您好，欢迎来到京西！[<a href="<?php echo U('User/login');?>">登录</a>] [<a href="<?php echo U('User/regist');?>">免费注册</a>] </li>
                <li class="line">|</li>
                <li>我的订单</li>
                <li class="line">|</li>
                <li>客户服务</li>
            </ul><?php endif; ?>
        </div>
    </div>
</div>
<!-- 顶部导航 end -->

<!--引入公共的jquery-->
<script type="text/javascript" src="<?php echo (C("COMMON_URL")); ?>Js/jquery-1.11.3.min.js"></script> 
<!--引入公共的jquery-->


        <div style="clear:both;"></div>

        <!-- 页面头部 start -->
        <div class="header w990 bc mt15">
            <div class="logo w990">
                <h2 class="fl"><a href="index.html"><img src="<?php echo (C("IMG_URL")); ?>logo.png" alt="京西商城"></a></h2>
            </div>
        </div>
        <!-- 页面头部 end -->

        
        <!-- 登录主体部分start -->
<div class="login w990 bc mt10 regist">
    <div class="login_hd">
        <h2>用户注册</h2>
        <b></b>
    </div>
    <div class="login_bd">
        <div class="login_form fl">
            <form action="/index.php/Home/User/regist.html" method="post">
                <ul><li><label for="">用户名：</label>
                        <input type="text" class="txt" name="name" />
                        <p>3-20位字符，可由中文、字母、数字和下划线组成</p>
                    </li>                    
                    <li><label for="">邮箱：</label>
                        <input type="text" class="txt" name="email" />
                        <p>填写格式正确的邮箱即可</p>
                    </li>
                    <li><label for="">密码：</label>
                        <input type="password" class="txt" name="password" />
                        <p>6-20位字符，可使用字母、数字和符号的组合，不建议使用纯数字、纯字母、纯符号</p>
                    </li>
                    <li><label for="">确认密码：</label>
                        <input type="password" class="txt" name="password2" />
                        <p> <span>请再次输入密码</p>
                    </li>
<script type="text/javascript">
var code_flag = false; //验证码是否通过验证
function check_code(){
    //获得输入的验证码
    var code = $('#verify_code').val();
    if(code.length==4){
        //触发ajax
        $.ajax({
            url:"<?php echo U('checkCode');?>",
            data:{'code':code},
            dataType:'json',
            type:'get',
            success:function(msg){
                if(msg.status==1){
                    $('#code_check_result').html('<span style="color:green">验证码正确</span>');
                    code_flag = true;
                }else{
                    $('#code_check_result').html('<span style="color:red">验证码错误</span>');
                    code_flag = false;
                }
            }
        });
    }
}
</script>
<li class="checkcode">
    <label for="">验证码：</label>
    <input type="text" id='verify_code' name="verify_code" maxlength='4'
     onkeyup='check_code()'/>
    <img src="<?php echo U('verifyImg');?>"  alt="验证码" onclick="this.src='/index.php/Home/User/verifyImg/'+Math.random()" />
    <span id='code_check_result'></span>
</li>
                    <li>
                        <label for="">&nbsp;</label>
                        <input type="checkbox" class="chb" checked="checked" /> 我已阅读并同意《用户注册协议》
                    </li>
                    <li>
                        <label for="">&nbsp;</label>
                        <input type="submit" value="" class="login_btn" />
                    </li>
                </ul>
                <input type='hidden' name='act' value='regist' />
            </form>
<script type="text/javascript">
    $(function(){
         //给form表单设置提交事件
        $('form').submit(function(evt){
            //判断验证码是否正确，再进行提交(否则阻止form表单提交)
            if(code_flag===false){
                evt.preventDefault(); //阻止form表单提交
            }
        });
    });
</script>
        </div>
        <div class="mobile fl">
            <h3>手机快速注册</h3>			
            <p>中国大陆手机用户，编辑短信 “<strong>XX</strong>”发送到：</p>
            <p><strong>1069099988</strong></p>
        </div>

    </div>
</div>
<!-- 登录主体部分end -->


        <div style="clear:both;"></div>
        <!-- 底部版权 start -->
        <div class="footer w1210 bc mt15">
            <p class="links">
                <a href="">关于ta们</a> |
                <a href="">联系我们</a> |
                <a href="">人才招聘</a> |
                <a href="">商家入驻</a> |
                <a href="">千寻网</a> |
                <a href="">奢侈品网</a> |
                <a href="">广告服务</a> |
                <a href="">移动终端</a> |
                <a href="">友情链接</a> |
                <a href="">销售联盟</a> |
                <a href="">京西论坛</a>
            </p>
            <p class="copyright">
                © 2005-2013 京东网上商城 版权所有，并保留所有权利。  ICP备案证书号:京ICP证070359号 
            </p>
            <p class="auth">
                <a href=""><img src="<?php echo (C("IMG_URL")); ?>xin.png" alt="" /></a>
                <a href=""><img src="<?php echo (C("IMG_URL")); ?>kexin.jpg" alt="" /></a>
                <a href=""><img src="<?php echo (C("IMG_URL")); ?>police.jpg" alt="" /></a>
                <a href=""><img src="<?php echo (C("IMG_URL")); ?>beian.gif" alt="" /></a>
            </p>
        </div>
        <!-- 底部版权 end -->
    </body>
</html>